package com.yuexunit.finance.member.action.v1;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.member.action.v1.model.MemberGrade;
import com.yuexunit.finance.member.action.v1.model.MemberGradeDetail;
import com.yuexunit.finance.member.action.v1.model.MemberGradeUpdateParams;
import com.yuexunit.finance.member.action.v1.model.SupplierCommissionGradeDetail;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/**
 * @ClassName: MemberGradeActionApi
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author chenxy
 * @date 2015年9月23日 下午5:54:25
 */
public interface MemberGradeActionApi {

	@Permission
	@Action(version = FinVersion1.class, description = "新增会员等级")
	@Parameter(name = "memberGradeId", description = "等级ID")
	public String createMemberGrade(MemberGrade params);

	@Permission
	@Action(version = FinVersion1.class, description = "更新会员等级")
	public void updateMemberGrade(MemberGradeUpdateParams params);

	@Permission
	@Action(version = FinVersion1.class, description = "删除会员等级")
	public void disableMemberGrade(
            @Parameter(name = "memberGradeId", description = "等级ID") Long memberGradeId
    );

	@Permission
	@Action(version = FinVersion1.class, description = "会员等级明细")
	public MemberGradeDetail inquireMemberGradeDetail(
            @Parameter(name = "memberGradeId", description = "等级ID") Long memberGradeId
    );

	@Permission
	@Action(version = FinVersion1.class, description = "会员等级列表")
	public PageList<MemberGradeDetail> inquireMemberGradePageList(
            @Parameter(name = "page", description = "分页参数") PageCriteria page
    );

	@Permission
	@Action(version = FinVersion1.class, description = "通过等级名称查找会员等级列表")
	public List<MemberGradeDetail>	inquireMemberGradeByGradeName(
			 @Parameter(name = "page", description = "分页参数") PageCriteria page,
			 @Parameter(name = "gradeName", description = "等级名称") String gradeName
	);

	@Permission
	@Action(version = FinVersion1.class, description = "新增分销商佣金等级")
	@Parameter(name = "commissionGradeId", description = "佣金级别ID")
	public String createSupplierCommissionGrade(
			 @Parameter(name = "enterpriseId", description = "企业ID") Long enterpriseId,
			 @Parameter(name = "commissionGradeName", description = "等级名称") String commissionGradeName,
			 @Parameter(name = "expenseName", description = "费用名称") String expenseName,
			 @Parameter(name = "annualRateStart", description = "年化率起") BigDecimal annualRateStart,
			 @Parameter(name = "annualRateEnd", description = "年化率止") BigDecimal annualRateEnd,
			 @Parameter(name = "expenseRate", description = "费用比例") BigDecimal expenseRate,
			 @Parameter(name = "effectiveDateStart", description = "有效期起") Date effectiveDateStart,
			 @Parameter(name = "effectiveDateEnd", description = "有效期止") Date effectiveDateEnd
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询分销商佣金等级详情")
	public SupplierCommissionGradeDetail inquireSupplierCommissionGradeDetail(
			@Parameter(name = "commissionGradeId", description = "佣金级别ID") Long commissionGradeId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询分销商佣金等级列表")
	public PageList<SupplierCommissionGradeDetail> inquireSupplierCommissionGradePageList(
			 @Parameter(name = "page", description = "分页参数") PageCriteria page
	);
}
